<{include file=$module.'/header.php'}>
<style type="text/css">
	.login-estate-head{height:7rem;}
	.login-estate-head .estate-logo img{width: 5rem;height:5rem;border-radius:50%;}
</style>
<div class="page" id="page-manage-goods">
	<header class="bar bar-nav common-bar-nav">
		<h1 class="title">用户注册</h1>
	</header>
	<div class="content">
		<!-- <div class="login-estate-head" >
			<div class="estate-logo"><img src="/upload/<{$company_logo}>" /></div>
		</div> -->

		<form id="form" class="member-login-form">
			<input type="hidden" name="do" value="reg">
			<div class="list-block m-t-1 list-block-first">
				<ul>
					<li>
						<div class="item-content">
							<div class="item-inner">
								<div class="item-title label">当前科室</div>
								<div class="item-input"><{$zone['name']}>
									<input id="data-zone" type="hidden" name="zone_id" value="<{$zone.id}>"/>
								</div>
							</div>
						</div>
					</li>
					<li>
						<div class="item-content">
							<div class="item-inner">
								<div class="item-title label">姓名</div>
								<div class="item-input">
									<input id="realname" type="text" name="realname" placeholder="姓名" value="<{$user.realname}>" />
								</div>
							</div>
						</div>
					</li>
					<li>
						<div class="item-content">
							<div class="item-inner">
								<div class="item-title label">手机号</div>
								<div class="item-input">
									<input id="username" type="text" name="username" placeholder="用户名/手机号" value="<{$user.tel}>" />
								</div>
							</div>
						</div>
					</li>
					<li>
						<div class="item-content">
							<div class="item-inner">
								<div class="item-title label">用户密码</div>
								<div class="item-input">
									<input  id="password" type="password" name="password" placeholder="输入密码" value=""  />
								</div>
							</div>
						</div>
					</li>
					
				</ul>
			</div>
			
			<div class="content-block m-b-0">
				<p><a id="login-submit" class="button button-big button-fill button-danger">绑定科室</a></p>
			</div>
			
		</form>
		
	</div>
</div>
<script>
	$(function () {
		$("#login-submit").click(function(e){
			var username = $("#username").val();
			var password = $("#password").val();
			if(username == ""){
				$.toast("请输入您的帐号");
				return;
			}
			if(password == ""){
				$.toast("请输入您的密码");
				return;
			}
			
			e.preventDefault();
			var data = $('#form').serializeArray();
			$.post("/<{$routeUrl}>/reg", data, function(response){
				if(response.code == 0){
					$.toast(response.msg);
					return;
				}
				if(response.code == 1){
					$.toast(response.msg,response.url);
					return;
				}
			});

		});

	});
</script>
<{include file=$module.'/footer.php'}>